package com.ybkj.o2o.zhuanxian.mapper;

import com.ybkj.o2o.zhuanxian.entity.CarAndLine;

import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CarAndLineMapper {

  int insert(CarAndLine record);

  List<CarAndLine> findByCar(Long carId);

  List<CarAndLine> findByLineName(String lineName);

//  int deleteByCar(Long carid);
  int deleteByCar(@Param("carid") Long carid, @Param("lineId") Long lineId);

  int deleteByLine(Long lineId);

  int updateLineNameByLine(@Param("lineid") Long id, @Param("name") String name);

  int updateCarNameByCar(@Param("carId") Long id, @Param("carName") String carName);

  List<CarAndLine> findByLine(Long lineId);

}
